import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 15965
 */
public class Main {
    public static void main(String[] args) {
        // create and configure beans
        ApplicationContext context = new ClassPathXmlApplicationContext("application.xml");

        // retrieve configured instance 1
        helloWorld helloWorld = context.getBean("helloWorld", helloWorld.class);

        // retrieve configured instance 2
        // HelloWorld helloworld = (HelloWorld) context.getBean("helloWorld");

        // retrieve configured instance 3
        // HelloWorld helloworld =  context.getBean(HelloWorld.class);
        helloWorld.say();
    }
}
